package com.tea.funct.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tea.common.annotation.Excel;
import com.tea.common.core.domain.BaseEntity;
import lombok.Data;
import org.springframework.data.annotation.Transient;

import java.util.Date;

/**
 * 会员管理对象 tea_member
 *
 * @author Sophia
 * @date 2024-05-25
 */
@Data
public class TeaMember extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 上级推荐码
     */
    @Excel(name = "上级推荐码")
    private String superReferralCode;

    /**
     * 推荐码
     */
    @Excel(name = "推荐码")
    private String referralCode;

    /**
     * 会员到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "会员到期时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date memberExpireDate;

    /**
     * 会员状态（0普通, 1会员, 2过期）
     */
    @Excel(name = "会员状态", readConverterExp = "0=普通,1=会员,2=过期")
    private String disable;
    
    /**
     * 会员推荐海报
     */
    @Excel(name = "会员推荐海报")
    private String recommendedPoster;

    /**
     * 会员分享小程序码
     */
    @Excel(name = "会员分享小程序码")
    private String smallShareQrcode;

    /**
     * 可提取天数
     */
    @Excel(name = "可提取天数")
    private Long extractableDays;

    /**
     * 已提取天数
     */
    @Excel(name = "已提取天数")
    private Long drawnDays;

    /**
     * 续费时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "续费时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date renewalTime;

    // 会员电话
    @Transient
    private String memberPhone;

}
